<?php

namespace App\Http\Controllers;

use App\Services\ApiService;
use Illuminate\Http\Request;
use Ninex\Lib\Http\Controllers\LibController;
class ApiController extends LibController
{

    public function __construct(Request $request,ApiService $service)
    {
        parent::__construct($request);
        $this->service = $service;
    }

    public function index()
    {
        return $this->noContent();
    }

    public function token()
    {
        return $this->success($this->service->token($this->request->all()));
    }

    public function info()
    {
        return $this->success($this->service->info($this->request->all()));
    }

    public function upload()
    {
        return $this->success($this->service->upload($this->request));
    }

    public function DescribeFile($file_id)
    {
        return $this->success($this->service->DescribeFile($file_id));
    }
}
